package com.aacar.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.aacar.dao.CarSeriesDao;
import com.aacar.dto.CarSeriesTypeDto;
import com.aacar.entity.CarSeriesType;
import com.aacar.service.CarSeriesService;
import com.aacar.vo.CarSeriesTypeVo;

@Repository("carSeriesService")
public class CarSeriesServiceImpl implements CarSeriesService{
	
	@Autowired
	private CarSeriesDao carSeriesDao;
	
	//获取车系类型
	public List<CarSeriesTypeVo> getCarSeriesType(CarSeriesTypeDto dto) {
		CarSeriesType cst = new CarSeriesType();
		cst.setBrandId(dto.getBrandId());
		cst.setPid(dto.getPid());
		return this.carSeriesDao.getCarSeriesType(cst);
	}
	
	//
	public List<CarSeriesTypeVo> getSeriesByName(CarSeriesTypeDto dto) {
		CarSeriesType cst = new CarSeriesType();
		cst.setBrandName(dto.getBrandName());
		return this.carSeriesDao.getSeriesByName(cst);
	}

}
